package com.hwd.gmall.common.constant;

/**
 * 订单微服务的常量类
 *
 * @author 黄伟东/Victor
 * @date 2022/5/9 17:20
 */
public class OrderConst {

    /** 订单的正常交换机 */
    public static final String ORDER_NORMAL_EXCHANGE = "order_normal_exchange";

    /** 订单的死信队列交换机 */
    public static final String ORDER_DEAD_EXCHANGE = "order_dead_exchange";

    /** 订单的死信队列 */
    public static final String ORDER_DEAD_QUEUE = "order_dead_queue";

    /** 订单的正常队列 */
    public static final String ORDER_NORMAL_QUEUE = "order_normal_queue";

    /** 消息进入死信队列的routingKey */
    public static final String ORDER_DEAD_ROUTING_KEY = "order.dead";

    /** 延迟消息进入正常队列的routingKey */
    public static final String ORDER_NORMAL_ROUTING_KEY = "order.normal";

    /** 延迟队列的过期时间，单位:毫秒 */
    public static final Long TTL = 30000L;

    /** 防止用户重复下单的计数器在redis中的key的前缀 */
    public static final String USER_ORDER_CANCEL_COUNT = "User_Order_Cancel_Count_";

    /** 防止重复和多端下单的计数器在redis中的key的前缀 */
    public static final String USER_CART_COUNT = "User_Cart_Count_";
}
